#ifndef _APK_COMMON_UTILS_H_
#define _APK_COMMON_UTILS_H_

#include "windows.h"
#include "vector"
#include "map"
#include "ApkButtonEx.h"

using namespace std;

class CCommonUtils
{
public:
	CCommonUtils();
	~CCommonUtils();

private:

	vector<CString> mTipMsgVector;

public:
	CString GetRightString(CString orgStr, CString flag);
	CString GetLeftString(CString orgStr, CString flag);

	void clearTipMsg();
	void addTipMsg(CString orgStr);
	CString GetTipMsg(unsigned int num);

	double FormatCurrent(CString temp);
	double FormatVoltage(CString temp);

	void GetBenchmarkValue(CString benchStr, double *low, double *high);
	CString GetTestResultSignaldBm(CString preValue, CString testValue, CString benchMark, CApkButtonEx &testItem);
	CString GetTestResultVoltage(double voltageValue, CString benchMark, CApkButtonEx &testItem);
	CString GetTestResultVoltageDoubleData(double voltageValue1, CString benchMark1, double voltageValue2, CString benchMark2, CApkButtonEx &testItem);
	CString GetTestResultCurrent(double currentValue, CString benchMark, CApkButtonEx &testItem);
	CString GetTestResultPersent(double valuePercent, CString benchMark, CApkButtonEx &testItem);

	CString GetTestResultSystemVersion(CString sysVersion, CString benchMark, CApkButtonEx &testItem);
	CString GetTestResultSN(CString snString, CString benchMark, CApkButtonEx &testItem);

	CString GetTestResultAreaCheck(double data, CString benchMark, CApkButtonEx &testItem, CString unit);

};

#endif// _APK_COMMON_UTILS_H_
